package com.yesep.learn.design.behavioral.template_method;

import com.yesep.learn.design.common.pojo.*;

import java.util.*;

public class WeekenOrder extends ShoppingOrder {

    public WeekenOrder(List<Goods> goodsList) {
        super(goodsList);
    }

    /**
     * 折扣比率
     */
    @Override
    protected double getPromotion() {
        double promotion = 0.8;
        System.out.printf("%.2f%% off \n", promotion * 100);
        return promotion;
    }
}
